<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app" ref="app">
        <div>{{ a }}</div>
        <div>{{ b }}</div>
        <div><button @click="test">修改</button></div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: "#app",
            data(){
                return {
                    a: 1,
                    b: 2
                }
            },
            methods: {
                test(){
                    let _this = this
                    this.a = 11
                    this.$nextTick(function get(){
                        console.log(_this.$refs.app.innerHTML)
                    })
                    this.b = 22
                }
            },
            
        })
    </script>
</body>
</html>